var app = angular.module("app",["ui.router","angularCSS"]);

app.config(["$stateProvider","$urlRouterProvider",
function($stateProvider,$urlRouterProvider){
	$stateProvider
	.state("index",{
		url: "/index",
		views:{
			"view":{
				templateUrl: "template/index/index.html",
				controller: "indexCtrl",
				css: "template/index/index.css",
			}
		}
	})
	.state("shansong",{
		url: "/shansong:text",
		views:{
			"view":{
				templateUrl: "template/shansong/shansong.html",
				controller: "shansongCtrl",
				css: "template/shansong/shansong.css",
			}
		}
	})
	.state("gouwuche",{
		url: "/gouwuche",
		views:{
			"view":{
				templateUrl: "template/gouwuche/gouwuche.html",
				controller: "gouwucheCtrl",
				css: "template/gouwuche/gouwuche.css",
			}
		}
	})
	.state("me",{
		url: "/me",
		views:{
			"view":{
				templateUrl: "template/me/me.html",
				controller: "meCtrl",
				css: "template/me/me.css",
			}
		}
	})
	.state("zhuc",{
		url: "/zhuc",
		views:{
			"view":{
				templateUrl: "template/zhuc/zhuc.html",
				controller: "zhucCtrl",
				css: "template/zhuc/zhuc.css"
			}
		}
	})
	
	$urlRouterProvider
	.otherwise("zhuc")
}])

.controller("ctrl",["$scope","count",function($scope,count){
	$scope.count = count;
	console.log($scope.count)
}])
